load('intermediate\CompileAllCIPCalcsALLLIBOR.mat');
addpath('figures', 'functions')

%% Set figure options

optfig.fontname     = 'Times New Roman';
optfig.dimension    = [0 0 8 6];
optfig.lw           = 1;
optfig.folder       = 'output\LIBOR\';
optfig.color        = num2cell(parula(7),2);
% optfig.color      = num2cell(jet(7),2);
optfig.style        = {'-','--',':','-.','-','--','-',};
optfig.marker       = {'none','o','x','s','+'};
optfig.markersize   = 10;

optfig.fontsize_tit = 17;
optfig.fontsize_ax  = 17; %46
optfig.fontsize_lab = 13;
optfig.fontsize_leg = 13;

optfig.plotfig = 1; % If 1, plots figures

%% Create figures

%Plots the price impact coefficient (alphas) by day
fig_FX_futures_price_impact(datesExtras, selectorNonHolidays, coeffs, optfig)

%Plots the cross-currency basis for all five currencies
fig_CIP_history(dateVecCIP2, CIPCalcsAll, optfig)

%Plots the welfare gains to arbitrage for all 5 currencies over the period
%for which we have microstructure estimates (late 2019-early 2021)
fig_CIP_welfare(datesExtras, selectorNonHolidays, WelfareArbs, optfig)

%Plots the gap-closing trade size for all currencies for the recent period
%for which we have microstructure data
fig_CIP_arbsize(datesExtras, selectorNonHolidays, WelfareArbs, optfig)

%Plots welfare gains to arbitrage for all currencies going back to 2010
%using composite estimates from recent period for price impact
fig_CIP_welfare_history_2010(CIPAllS1, WelfareArbs2, optfig)

%Plots surface of alpha coefficients, cross-market price impact
%assumptions, and cross-currency bases required to generate $10B in welfare
%losses
load('input\Figure11Workspace.mat')
fig_surface_plots(alphaGrid, crossMarketGrid, CCBEuro, optfig)

%Generates price impact curves that show $ trade size versus percent (in
%percent, so 1.0 is 1%) for each currency
fig_price_impact_curves(valsForSumStats2, alphas, Multipliers, TickSizes, optfig)